<!doctype html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<title>
			岳阳楼
		</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<script src="{{__PUBLIC__}}/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="{{__PUBLIC__}}/bootstrap/js/bootstrap.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/bootstrap/css/bootstrap.css"/>
		<link rel="stylesheet" href="public/kindeditor/themes/default/default.css" />
		<script src="public/kindeditor/kindeditor.js"></script>
		<script src="public/kindeditor/lang/zh_CN.js"></script>
		<script src="{{__PUBLIC__}}/js/common.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=WcqLYXBH2tHLhYNfPNpZCD4s"></script>
		<script type="text/javascript" src="public/js/map.js"></script>
		<script type="text/javascript">var root = "{{__ROOT__}}";</script>
	</head>
	<body>
		
		<section class="navbar navbar-default">
			<div class="container table-responsive" class="dp" style="padding: 20px 0;">
				{{foreach from="$data" key="$k" value="$v"}}
				<table class="table" border="" cellspacing="" style="font-size: 14px;margin-bottom: 15px;" cellpadding=""  lng="{{$v['lng']}}" lat="{{$v['lat']}}">
					<tr>
						<td rowspan='4' style="width: 120px;">
							<img src="{{$v['thumb']}}" style="width:100px;height:130px;margin: 0 auto;"/>
						</td>
						<td>
							距离 {{$v['name']}} 
							<span>
							</span> 米
						</td>
					</tr>
					<tr>
						<td>
							订餐电话:23434344
						</td>
					</tr>
					<tr>
						<td>
							地址:北京市丰台区看丹桥
						</td>
					</tr>
					<tr>
						<td>
							<a href="{{U('orderInfo',array('dpid'=>$v['id']))}}">
								查看订单信息
							</a>
						</td>
					</tr>
				</table>
				{{endforeach}}
			</div>
		</section>
		<!--<div id="" style="height: 200px;">
		</div>-->
		<script type="text/javascript">$(function() {
	getGeolocation(function(point) {
		var lng2 = point.lng;
		var lat2 = point.lat;
		$('.table').each(function(i) {
			var lng1 = $(this).attr('lng');
			var lat1 = $(this).attr('lat');
			pos = {
				lng1: lng1,
				lat1: lat1,
				lng2: lng2,
				lat2: lat2
			};
			$(this).find('span').html(getDistance(pos));
		});
	})
})</script>
	</body>
</html>
